package com.ontheroad.leanCloud.event;

import org.springframework.context.ApplicationEvent;

import java.util.Map;

/**
 * Created by kedong on 2017/11/23 0023.
 */
public class PushToUserEvent extends ApplicationEvent {
    private static final long serialVersionUID = -4553934345709611755L;

    /**
     * Create a new ApplicationEvent.
     *
     * @param source  the component that published the event (never {@code null})
     * @param userId
     * @param data
     */
    public PushToUserEvent(Object source, Integer userId, Map<String, Object> data) {
        super(source);

        this.clientId = userId;
        this.data = data;
    }


    private final Integer clientId;

    private final Map<String, Object> data;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }


    public Integer getClientId() {
        return clientId;
    }

    public Map<String, Object> getData() {
        return data;
    }
}
